package com.qf.profile.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qf.profile.entity.User;
import com.qf.profile.mapper.UserMapper;
import com.qf.profile.service.IUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author gp14
 * @since 2022-09-19
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {

    @Autowired
    private UserMapper userMapper;

    /**
     * 自定义的方法
     * @param i
     * @param i1
     * @return
     */
    @Override
    public IPage<User> customPage(int i, int i1) {
        //逻辑判断
        if(i == 0){
            i = 1; //默认是第一页
        }
        int startRow = (i-1)*i1;

       // IPage<User> iPage = this.baseMapper.selectPage(new Page<User>(i,i1),null);


        //userMapper.selectPage()
        return null;
    }
}
